g<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

</head>

<body>
<script type="text/javascript">

function initForms()
{
	//document.getElementById("error").innerHTML+="<br /> Init";
	for (var i=0; i< document.forms.length; i++) {
	var alltags = document.forms[i];
	for(var j=0;j<document.forms[i].elements.length;j++){
		//alert('Okay')
		//document.getElementById("error").innerHTML+="<br /> Form "+i;;
		if(alltags.elements[j].type=="button")
		{
			alltags.elements[j].onclick = processbtn;
		//	document.getElementById("error").innerHTML+="<br /> Process Btn i ="+i+" j = "+j;
		}
	}
  }
}
function processbtn(){
	if(confirm('Would you like to delete this row of data '+this.value+" id "+ this.id)){
 	var parentNodes = this.parentNode;
	var er = document.getElementById("error").parentNode;
	var pnode =parentNodes.parentNode;
	if ( pnode.tagName.toUpperCase()=="TR")
	
	pnode.style.display='none';}
}
</script>
<form id="form1" name="form1" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="4">
    <tr>
      <td>Name<div id="error"></div></td>
      <td>Action</td>
    </tr>
    <tr>
      <td>Hi One</td>
      <td><input type="button" name="button" id="123" value="aKUA" /></td>
    </tr>
    <tr>
      <td>From</td>
      <td><input type="button" name="button2" id="button2" value="MInA" /></td>
    </tr>
  </table>
</form>
<script type="text/javascript">
initForms();
</script>
</body>
</html>